home *** CD-ROM | disk | FTP | other *** search
- # DepMAke.mk
- #
- # Notes:
-
- #DEPSMK *= ":<Pre-gen>:Dependencies.mk"
- DEPSDIRNAME *= [Dependencies]
-
- #.INCLUDE : ":<Pre-gen>:Sources.mk"
- #.INCLUDE : ":<Pre-gen>:Imports.mk"
- #.INCLUDE : $(DEPSMK) # Is this kosher -- to include the file we're updating?
- .INCLUDE : ":(Temporary):Include.mk"
-
- QQ = "
- ALLSRCS = $(SRCS) $(MORESRCS)
- ALLDEPS = $(ALLSRCS:b:+".d")
-
- # The default target.
- default : test depmake
-
- # Used for debugging makefiles.
- test :;
- # echo ALLDEPS = '$(ALLDEPS)'
-
- depsdir : ":$(DEPSDIRNAME):"
-
- ":%:" : "$(@:d:d)" # This should work perfectly, but it doesn't. dmake sucks.
- # Echo $$* = $*
- # Echo $$@ = $@
- # Echo $$(@:d:d) = $(@:d:d)
- Echo "Creating the $* directory."
- Echo "> $*"
- NewFolder '$@'
-
- #depmake : depsdir $(DEPSMK)
- depmake : depsdir
-
- #$(DEPSMK) : $(ALLDEPS)
- # Echo "Concatenating dependencies..."
- # Echo "# Make dependencies generated automatically by MakeDepend." > $(DEPSMK)
- # Echo "" >> $(DEPSMK)
- # Catenate `Files -f ":$(DEPSDIRNAME):"` >> $(DEPSMK)
- # SetFile -c 'R*ch' $(DEPSMK)
-
- #%.d .UPDATEALL :| %.cc %.cpp %.cp %.c
- %.d :| %.cc %.cpp %.cp %.c
- # Echo "$$? = $?"
- # Echo "$$& = $&"
- # Echo "$$< = $<"
- # Echo "$$^ = $^"
- Echo "Analyzing dependencies for '$(<)'."
- MakeDepend.pl --scf "$<"
- SetFile -c 'R*ch' "$@"
-
- .SOURCE.d : ":$(DEPSDIRNAME):"
-
- .PHONY : test depmake depsdir
-